﻿using System.Collections.Generic;
using System.Threading.Tasks;
using BCCommon.OAEnums.Attendance;
using BCEntity.OA.Attendance.AttendanceRemedyApply;

namespace BCData.OA.Attendance.AttendanceRemedyApply
{
    public interface IAttendanceRemedyApplyData
    {
        /// <summary>
        /// 新增一个补卡申请信息
        /// </summary>
        /// <param name="entity">补卡信息</param>
        /// <returns></returns>
        Task<AttendanceRemedyApplyEntity> InsertAsync(AttendanceRemedyApplyEntity entity);

        /// <summary>
        /// 获取补卡申请历史记录
        /// </summary>
        /// <param name="adminId">员工Id</param>
        /// <returns></returns>
        Task<IEnumerable<AttendanceRemedyApplyEntity>> GetEntitiesAsync(long? adminId);

        /// <summary>
        /// 补卡申请详情
        /// </summary>
        /// <param name="remedyApplyId">补卡申请Id</param>
        /// <returns></returns>
        Task<AttendanceRemedyApplyEntity> GetByIdAsync(long remedyApplyId);
        /// <summary>
        /// 更新指定的补卡申请单状态
        /// </summary>
        /// <param name="applyCode">申请编号</param>
        /// <param name="modifierName">修改人</param>
        /// <param name="status">状态</param>
        /// <returns></returns>
        Task<AttendanceRemedyApplyEntity> UpdateStatus(string applyCode, string modifierName, RemedyApplyStatus status, long modifierId);
        /// <summary>
        /// 根据申请编号，获取对应的补卡申请信息
        /// </summary>
        /// <param name="applyCode">申请编号</param>
        /// <returns></returns>
        Task<AttendanceRemedyApplyEntity> GetByApplyCodeAsync(string applyCode);
    }
}
